﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using UI.WebPage.Background;
using Model.Config;
using BLL.Config;
using Com.Ompchina.Lib.Net;
namespace Com.Ompchina.Web.admin.conf
{
    public partial class list_term : ListInfoPage, IListInfo
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && PageAction.Equals("list")) { this.InitParameter(); }
        }

        #region IListInfo 成员
        /// <summary>
        /// 初始化地址栏参数
        /// </summary>
        public void InitParameter()
        {
            ddlParent.DefaultSelect = RequestParam.GetString(Request, "parent");
        }

        public void ExecuteUpdate()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region 页面私有方法
        /// <summary>
        /// 分页获取术语列表
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        protected IList<TermInfo> _GetTerm(int pageSize, out int recordCount) 
        {
            return new TermBLL().BackList(int.Parse(ddlParent.SelectedValue), "", "", PageIndex, pageSize, out recordCount);
        }
        /// <summary>
        /// 按钮搜索事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Redirect(string.Format("list_term.aspx?action=list&parent={0}", ddlParent.SelectedValue), 0);
        }
        #endregion
        
    }
}
